package controll;

import java.util.List;

import com.pixelTech.technology.util.DAOFactory;

import modell.Servico;

public class ServicoRN {
	private IServicoDAO servicoDao;

	public ServicoRN(){
		this.servicoDao = DAOFactory.criaServicoDAO();
	}
	
	public List<Servico> listar() {
		return this.servicoDao.listar();
	}

	public void excluir(Servico servico) {
		this.servicoDao.excluir(servico);
	}

	public void salvar(Servico servico) {
		this.servicoDao.salvar(servico);
	}

	public void alterar(Servico servicoAlterado) {
		this.servicoDao.alterar(servicoAlterado);
	}

	public void excluirPorId(Integer idSer) {
		this.servicoDao.excluirPorId(idSer);
	}

	public Servico buscarServico(Integer idSer) {
		return this.servicoDao.buscarServico(idSer);		
	}

}
